import {useAxios} from '@/hooks/web/useAxios'

const request = useAxios()

//大屏查询患者列表
export const getPat = (keyWord, hospital) => {
    return request.get({
        url: '/system/screen/listPat?keyWord=' + keyWord + '&hospital=' + hospital + '&dataType=TJ02'
    });
};

//查询预警列表
export const getWarn = () => {
    return request.get({
        url: '/system/screen/warnList?dataType=TJ02'
    })
}

//序列号查询患者体征数据
export const getPatSign = (visitNo: string) => {
    return request.get({
        url: '/system/screen/patSign?visitNo=' + visitNo + '&dataType=TJ02'
    })
}

//根据序列号查询患者预警信息
export const getPatWarn = (visitNo: string) => {
    return request.get({
        url: '/system/screen/warnList/patient?visitNo=' + visitNo
    })
}

//根据序列号处理异常
export const handleAbnormal = (params) => {
    return request.put({
        url: '/system/screen/warn/handle/patient',
        params
    })
}

//处理预警
export const handleWarn = (data: Array<object>) => {
    return request.post({
        url: '/system/screen/warn/handle',
        data
    })
}
